# 以列表为例
# cart = ['牛奶', '面包', '纸巾', '酱油', '火腿肠']
# # 通过for循环遍历列表，每次从获取一个元素
# for item in cart:
#     print(item)
# chars = 'helloworld'
# for c in chars:
#     print(c)
# 创建列表，列表中包含一组成绩，计算出所有成绩的平均值
score = [72, 83, 90, 66, 52]
# 求和
total = 0
for i in score:
    # print(i)
    # 将每个成绩加到total
    total += i
print(total/len(score))
# https://gitee.com/greenphp/nsd2404
